﻿<!DOCTYPE html>
<html style="background: none;">
<head>
    <meta charset="utf-8"/>
    <title>coolface管理系统</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=9"/>

    <meta name="keywords" content="railway,Service,RailwayService"/>
    <meta name="description" content="高铁客户端,高铁客户服务,高铁客户服务首页"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <!-- basic styles -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="assets/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="assets/css/validationEngine.jquery.css"/>
    <link rel="stylesheet" href="assets/css/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="assets/css/validationEngine.jquery.css" type="text/css">
    <!--[if IE 7]>
    <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    <!-- page specific plugin styles -->
    <!-- fonts -->
    <!--
		<link rel="stylesheet" href="http://fonts.useso.com/css?family=Open+Sans:400,300" />
		-->
    <!-- ace styles -->
    <link rel="stylesheet" href="assets/css/ace.min.css"/>
    <link rel="stylesheet" href="assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="assets/css/ace-skins.min.css"/>
    <!--[if lte IE 8]>
    <link rel="stylesheet" type="text/css" href="bootstrap.min.css" media="screen"/>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>

    <script type="text/javascript" src="script/ie.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="assets/js/jquery.placeholder.js"></script>
    <![endif]-->
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="assets/js/ace-extra.min.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="assets/js/html5shiv.js"></script>
    <script src="assets/js/respond.min.js"></script>
    <![endif]-->
    <!-- Bootstrap-Table -->
    <link rel="stylesheet" href="assets/css/bootstrap-table.min.css"/>
    <link rel="stylesheet" href="assets/css/styles.css"/>
    <style type="text/css">
        .modal[isbindmv] .modal-header {
            cursor: move;
        }
         .iconLogos {
         background-image: url(./assets/images/ydlLogo.png);
         width:100%;
         height:40px;
        }
        
    </style>
    <script type="text/javascript">
        var btModalMoveEx = function () {
            function moveEx($this) {
                var $head = $this.find(".modal-header"),
                        $dialog = $this.find(".modal-dialog");
                var move = {
                    isMove: false,
                    left: 0,
                    top: 0
                };
                $this.on("mousemove", function (e) {
                    if (!move.isMove) return;
                    $dialog.offset({
                        top: e.pageY - move.top,
                        left: e.pageX - move.left
                    });
                }).on("mouseup", function () {
                    move.isMove = false;
                });
                $head.on("mousedown", function (e) {
                    move.isMove = true;
                    var offset = $dialog.offset();
                    move.left = e.pageX - offset.left;
                    move.top = e.pageY - offset.top;
                });
            }

            var old = $.fn.modal;
            $.fn.modal = function (o, _r) {
                var $this = $(this);
                // 标识 是否已经绑定过移动事件了.用于防止重复绑定
                if (!$this.attr("isbindmv")) {
                    $this.attr("isbindmv", "1");
                    moveEx($this);
                }
                return old.call(this, o, _r);
            };
        };
    </script>
    
    <script>
        function loadPage(url) {
            $("#main-content").load(url + "?time=" + (new Date().getTime()));
        }

        function logout() {
            if (confirm("确认退出系统？") == true) {
                sessionStorage.removeItem('token');
                window.location.href = "./login.html";
//                $.ajax({
//                    type: "POST",
//                    url: '/user/common/sessionLogout',
//                    dataType: 'json',
//                    beforeSend: function (request) {
//                        request.setRequestHeader("Authorization", localStorage.token);
//                    },
//                    //data:$('#resetPasswordFormId').serialize(),// 你的formid
//                    error: function (request) {
//                        alert(request);
//                        //$(".overlay").remove();
//                        //alert("Connection error");
//                    },
//                    success: function (rs) {
//                        if (rs.success) {
//                            window.location.href = "./login.html";
//                        } else {
//                            alert(rs.message);
//                            //$(".overlay").remove();
//                        }
//                    }
//                });
            }
        }

        function getLoginUserName() {
            $.ajax({
                type: "POST",
                url: '/user/admin/adminGetUserName',
                dataType: 'json',
                beforeSend: function (request) {
                    request.setRequestHeader("Authorization", sessionStorage.token);
                },
                error: function (request) {
                    //alert(request);
                },
                success: function (rs) {
                    if (rs.success) {
                        $("#user-info-name").after(rs.data);
                    }
                }
            });
        }
      
        function resetPassword() {
        	
            $(this).overlay({
                closeOnClick: true
            });
            var $that = $(this);
            //var  $pass = $that.find('input[name="newPassword"]').val();
            // var  $conPass = $that.find('input[name="repeatNewPassword"]').val();
            var oldPassword = $("#oldPassword").val();
            var newPassword = $("#password").val();
            var conPass = $("#confirm_password").val();
            var obj = jQuery("#resetPasswordFormId").validationEngine('validate', {            	
            	promptPosition: "centerRight",
                autoPositionUpdate: true,
                validationEventTrigger:'blur',
            	binded:true,
                showOneMessage:true
            });
             if (!obj) {
            	$(".overlay").remove();
                return false;
            };
             /*  
            if (conPass === '') {
                alert("确认密码为空，请输入");
                return false;
            }
            ;
            if (pass != conPass) {
                alert("两次输入的密码不一致，请重新输入");
                return false;
            }
            ; */
            $.ajax({
                type: "POST",
                url: '../admin/resetPassword',
                dataType: 'json',
                data: {
                	oldPassword:oldPassword,
                	newPassword:newPassword
                },
                error: function (request) {
                    alert(request);
                    $(".overlay").remove();
                    //alert("Connection error");
                },
                success: function (rs) {
                    if (rs.success) {
                        alert("修改成功");
                        $("#updatesecretModal").modal('hide');
                        window.location.href = "login.html";
                    } else {
                        alert(rs.message);
                        $(".overlay").remove();
                        //window.location.href="index.html";
                    }
                }
            });
        }
    </script>
</head>

<body onload="timeShow()">
<div class="navbar navbar-default" id="navbar"
     style="background-image: url(assets/images/index.png); width: 100%;background-repeat-x: no-repeat;">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>
                <!-- &#xe601; -->
                <img alt="" src="./assets/images/coolface.png" style="">
                    <i class="iconLogoss"></i>
                    <span style="position: relative;top: 6px;">后台管理系统</span>
                </small>
            </a>
            <!-- /.brand -->
        </div>
        <!-- /.navbar-header -->
        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">
                <li class="light-blue">
                    <img class="nav-user-photo" src="assets/avatars/user.jpg" alt="Admin's Photo"/>
                    <span class="user-info">
						<small id="user-info-name">欢迎光临</small>
					</span>
                </li>
                <li class="light-blue" style="border-left: 0; margin-left: -10px;">
                    <a href="#" data-toggle="modal" data-target="#updatesecretModal">【修改密码】
                    </a>
                </li>
                <li class="light-blue" style="margin-right: -20px;">
                    <a href="#" onclick="logout()">
                        <i class="iconfont-close">&#xe751;</i>
                    </a>
                </li>
            </ul>
            <!-- /.ace-nav -->
        </div>
        <!-- /.navbar-header -->
    </div>
    <!-- /.container -->
</div>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>
        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {
                }
            </script>
            <ul class="nav nav-list">
                <li>
                    <a href="#" class="dropdown-toggle">
                    <i class="icon">&#xe60c;</i>
                    <span class="menu-text">首页</span>
                    </a>
                </li>
            </ul>
            <!-- /.nav-list -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left" data-icon1="icon-double-angle-left"
                   data-icon2="icon-double-angle-right"></i>
            </div>
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {
                }
            </script>
        </div>
        <div id="main-content" class="main-content">
            <div class="page-content">
                <div class="page-header">
                    <h1>
                        今日情况
                        <small>
                            <i class="icon-double-angle-right"></i>
                            统计
                        </small>
                        <span id="showTimeBox" style="float: right"></span>
                    </h1>
                </div><!-- /.page-header -->
                <div class="row" style="height: 120px;">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->

                        <!--<div class="alert alert-block alert-success">-->
                            <!--<button type="button" class="close" data-dismiss="alert">-->
                                <!--<i class="icon-remove"></i>-->
                            <!--</button>-->

                            <!--<i class="icon-ok green"></i>-->

                            <!--欢迎使用-->
                            <!--<strong class="green">-->
                                <!--Ace后台管理系统-->
                                <!--<small>(v1.2)</small>-->
                            <!--</strong>-->
                            <!--,轻量级好用的后台管理系统模版.-->
                        <!--</div>-->

                        <div class="row">
                            <div class="space-6"></div>

                            <div class="col-sm-10 infobox-container" style="text-align: left">
                                <div class="infobox infobox-green" id="reportMessage" style="cursor: pointer">
                                    <div class="infobox-icon">
                                        <i class="glyphicon glyphicon-comment largeIcon"></i>
                                    </div>

                                    <div class="infobox-data">
                                        <span class="infobox-data-number" id="postReportNumb">--</span>
                                        <div class="infobox-content">帖子举报</div>
                                    </div>
                                    <!--<div class="stat stat-success">8%</div>-->
                                </div>

                                <div class="infobox infobox-green" id="newMessage" style="cursor: pointer">
                                    <div class="infobox-icon">
                                        <i class="glyphicon glyphicon-comment largeIcon"></i>
                                    </div>

                                    <div class="infobox-data">
                                        <span class="infobox-data-number" id="postNumb">--/--</span>
                                        <div class="infobox-content">新帖/总帖数</div>
                                    </div>

                                    <!--<div class="badge badge-success">-->
                                        <!--+32%-->
                                        <!--<i class="icon-arrow-up"></i>-->
                                    <!--</div>-->
                                </div>

                                <div class="infobox infobox-pink" id="newUsers" style="cursor: pointer">
                                    <div class="infobox-icon">
                                        <i class="glyphicon glyphicon-user largeIcon"></i>
                                    </div>

                                    <div class="infobox-data">
                                        <span class="infobox-data-number" id="userNumb">--/--</span>
                                        <div class="infobox-content">新用户/总用户数</div>
                                    </div>
                                    <!--<div class="stat stat-important">4%</div>-->
                                </div>

                                <div class="infobox infobox-blue" id="newGroup" style="cursor: pointer">
                                    <div class="infobox-icon">
                                        <i class="icon-group largeIcon"></i>
                                    </div>

                                    <div class="infobox-data">
                                        <span class="infobox-data-number"id="groupNumb">--/--</span>
                                        <div class="infobox-content">新群/总群组数</div>
                                    </div>
                                </div>

                                <!--<div class="infobox infobox-orange2  ">-->
                                    <!--<div class="infobox-icon">-->
                                        <!--<i class="icon-eye-open largeIcon"></i>-->
                                    <!--</div>-->
                                    <!--&lt;!&ndash;<div class="infobox-chart">&ndash;&gt;-->
                                        <!--&lt;!&ndash;<span class="sparkline" data-values="196,128,202,177,154,94,100,170,224"></span>&ndash;&gt;-->
                                    <!--&lt;!&ndash;</div>&ndash;&gt;-->

                                    <!--<div class="infobox-data">-->
                                        <!--<span class="infobox-data-number" id="lookNumb">6,251</span>-->
                                        <!--<div class="infobox-content">页面查看次数</div>-->
                                    <!--</div>-->

                                    <!--<div class="badge badge-success">-->
                                        <!--7.2%-->
                                        <!--<i class="icon-arrow-up"></i>-->
                                    <!--</div>-->
                                <!--</div>-->

                                <!--<div class="infobox infobox-blue2  ">-->
                                    <!--<div class="infobox-progress">-->
                                        <!--<div class="easy-pie-chart percentage" data-percent="42" data-size="46">-->
                                            <!--<span class="percent">42</span>%-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <!--<div class="infobox-data">-->
                                        <!--<span class="infobox-text">交易使用</span>-->

                                        <!--<div class="infobox-content">-->
                                            <!--<span class="bigger-110">~</span>-->
                                            <!--剩余58GB-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</div>-->
                            </div>

                            <div class="vspace-sm"></div>

                            <!--<div class="col-sm-6">-->
                                <!--<div class="widget-box">-->
                                    <!--<div class="widget-header widget-header-flat widget-header-small">-->
                                        <!--<h5>-->
                                            <!--<i class="icon-signal"></i>-->
                                            <!--访问来源-->
                                        <!--</h5>-->

                                        <!--<div class="widget-toolbar no-border">-->
                                            <!--<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">-->
                                                <!--本周-->
                                                <!--<i class="icon-angle-down icon-on-right bigger-110"></i>-->
                                            <!--</button>-->

                                            <!--<ul class="dropdown-menu pull-right dropdown-125 dropdown-lighter dropdown-caret">-->
                                                <!--<li class="active">-->
                                                    <!--<a href="#" class="blue">-->
                                                        <!--<i class="icon-caret-right bigger-110">&nbsp;</i>-->
                                                        <!--本周-->
                                                    <!--</a>-->
                                                <!--</li>-->

                                                <!--<li>-->
                                                    <!--<a href="#">-->
                                                        <!--<i class="icon-caret-right bigger-110 invisible">&nbsp;</i>-->
                                                        <!--上周-->
                                                    <!--</a>-->
                                                <!--</li>-->

                                                <!--<li>-->
                                                    <!--<a href="#">-->
                                                        <!--<i class="icon-caret-right bigger-110 invisible">&nbsp;</i>-->
                                                        <!--本月-->
                                                    <!--</a>-->
                                                <!--</li>-->

                                                <!--<li>-->
                                                    <!--<a href="#">-->
                                                        <!--<i class="icon-caret-right bigger-110 invisible">&nbsp;</i>-->
                                                        <!--上月-->
                                                    <!--</a>-->
                                                <!--</li>-->
                                            <!--</ul>-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <!--<div class="widget-body">-->
                                        <!--<div class="widget-main">-->
                                            <!--<div id="piechart-placeholder"></div>-->

                                            <!--<div class="hr hr8 hr-double"></div>-->

                                            <!--<div class="clearfix">-->
                                                <!--<div class="grid3">-->
															<!--<span class="grey">-->
																<!--<i class="icon-facebook-sign icon-2x blue"></i>-->
																<!--&nbsp; likes-->
															<!--</span>-->
                                                    <!--<h4 class="bigger pull-right">1,255</h4>-->
                                                <!--</div>-->

                                                <!--<div class="grid3">-->
															<!--<span class="grey">-->
																<!--<i class="icon-twitter-sign icon-2x purple"></i>-->
																<!--&nbsp; tweets-->
															<!--</span>-->
                                                    <!--<h4 class="bigger pull-right">941</h4>-->
                                                <!--</div>-->

                                                <!--<div class="grid3">-->
															<!--<span class="grey">-->
																<!--<i class="icon-pinterest-sign icon-2x red"></i>-->
																<!--&nbsp; pins-->
															<!--</span>-->
                                                    <!--<h4 class="bigger pull-right">1,050</h4>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                        <!--</div>&lt;!&ndash; /widget-main &ndash;&gt;-->
                                    <!--</div>&lt;!&ndash; /widget-body &ndash;&gt;-->
                                <!--</div>&lt;!&ndash; /widget-box &ndash;&gt;-->
                            <!--</div>&lt;!&ndash; /span &ndash;&gt;-->
                        </div><!-- /row -->
                        <div class="hr hr32 hr-dotted"></div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
                <div class="space-6"></div>
                <div class="page-header">
                    <h1>
                        快捷操作
                        <!--<small>-->
                            <!--<i class="icon-double-angle-right"></i>-->
                            <!--统计-->
                        <!--</small>-->
                    </h1>
                </div><!-- /.page-header -->
                <div class="infobox infobox-green infobox-small infobox-dark" id="postMessage" style="cursor:pointer">
                    <div class="infobox-chart">
                        <i class="glyphicon glyphicon-comment largeIcon"></i>
                    </div>

                    <div class="infobox-data">
                        <div class="infobox-content">发布帖子</div>
                        <!--<div class="infobox-content">1,205</div>-->
                    </div>
                </div>
                <div class="infobox infobox-blue infobox-small infobox-dark" id="creatGroup" style="cursor:pointer">
                    <div class="infobox-chart">
                        <!--<span class="sparkline" data-values="3,4,2,3,4,4,2,2"></span>-->
                        <i class="icon-group largeIcon"></i>
                    </div>

                    <div class="infobox-data">
                        <div class="infobox-content">创建群组</div>
                        <!--<div class="infobox-content">$32,000</div>-->
                    </div>
                </div>

                <div class="infobox infobox-pink infobox-small infobox-dark" id="newUser" style="cursor:pointer">
                    <div class="infobox-chart">
                        <i class="glyphicon glyphicon-user largeIcon"></i>
                    </div>

                    <div class="infobox-data">
                        <div class="infobox-content">新建用户</div>
                        <!--<div class="infobox-content">1,205</div>-->
                    </div>
                </div>
            </div>
            </div><!-- /.page-content -->
        </div>
        <!-- /.main-content -->
        <div class="ace-settings-container" id="ace-settings-container">
            <!-- <div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
                    <i class="icon-cog bigger-150"></i>
                </div> -->
            <div class="ace-settings-box" id="ace-settings-box">
                <div>
                    <div class="pull-left">
                        <select id="skin-colorpicker" class="hide">
                            <option data-skin="default" value="#438EB9">#438EB9</option>
                            <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                            <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                            <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                        </select>
                    </div>
                    <span>&nbsp; 选择皮肤</span>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar"/>
                    <label class="lbl" for="ace-settings-navbar"> 固定导航条</label>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar"/>
                    <label class="lbl" for="ace-settings-sidebar"> 固定滑动条</label>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs"/>
                    <label class="lbl" for="ace-settings-breadcrumbs">固定面包屑</label>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl"/>
                    <label class="lbl" for="ace-settings-rtl">切换到左边</label>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container"/>
                    <label class="lbl" for="ace-settings-add-container">
                        切换窄屏
                        <b></b>
                    </label>
                </div>
            </div>
        </div>
        <!-- /#ace-settings-container -->
    </div>
    <!-- /.main-container-inner -->
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>
<!-- /.main-container -->
<!-- 重置密码的modal start-->
<div class="modal fade" id="updatesecretModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div id="modalDialog" class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="exampleModalLabel" style="text-align: center;">重置密码</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="resetPasswordFormId"
                      style="border-image:none;padding: 30px;margin: auto;" role="form" method="get">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="oldPassword">旧密码</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control validate[required]" id="oldPassword" name="oldPassword"
                                   >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="newPassword">新密码</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control validate[required,minSize[6],maxSize[12],custom[notSpaceNumber]]" id="password" name="password"
                                    >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="repeatNewPassword">确认密码</label>
                        <div class="col-sm-10">
                       <!--  name="repeatNewPassword" -->
                            <input type="password" class="form-control validate[required,equals[password],custom[notSpaceNumber]]" id="confirm_password" name="confirmPassword" 
                                    >
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" onclick="resetPassword();" class="btn btn-primary">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 重置密码的modal end-->
<!-- basic scripts -->
<!--[if !IE]> -->
<script src="assets/js/jquery-2.0.3.min.js"></script>
<!-- <![endif]-->
<!--[if IE]>
<script src="assets/js/jquery-1.10.2.min.js"></script>
<![endif]-->
<!--[if !IE]> -->
<script type="text/javascript">
    window.jQuery || document
            .write("<script src='assets/js/jquery-2.0.3.min.js'>" + "<" + "script>");
</script>
<!-- <![endif]-->
<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>" + "<" + "script>");
</script>
<![endif]-->
<script src="assets/js/jquery.overlay.min.js"></script>
<script type="text/javascript">
//    if ("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "script>");
</script>
<script src="assets/js/bootstrap.min.js"></script>
<!--<script src="assets/js/bootstrap.js"></script>-->
<script src="assets/js/bootstrap-table/bootstrap-table.min.js"></script>
<script src="assets/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="assets/js/typeahead-bs2.min.js"></script>
<!-- page specific plugin scripts -->
<!--[if lte IE 8]>
<script src="assets/js/excanvas.min.js"></script>
<![endif]-->
<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery.easy-pie-chart.min.js"></script>
<script src="assets/js/jquery.sparkline.min.js"></script>
<script src="assets/js/flot/jquery.flot.min.js"></script>
<script src="assets/js/flot/jquery.flot.pie.min.js"></script>
<script src="assets/js/flot/jquery.flot.resize.min.js"></script>
<script src="assets/js/jquery.validationEngine-zh_CN.js"></script>
<script src="assets/js/jquery.validationEngine.js"></script>
<script src="assets/js/jquery.validate.js"></script>
<!-- ace scripts -->
<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<script type="text/javascript" charset="gbk" src="assets/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="gbk" src="assets/ueditor/ueditor.all.js"> </script >
<script type="text/javascript" charset="utf-8" src="assets/ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    //$('#updatesecretModal').modal({backdrop: 'static'});

    // 使modal在window居中，并且可以拖动
    $(document).on("shown.bs.modal", ".modal", function () {
        $(this).css('display', 'block');
        var $dialog = $(this).find('.modal-dialog'),
                modalHeight = $(window).height() / 2 - $dialog.height() / 2;
//                modalWidth = $(window).width() / 2 - $dialog.width() / 2;

        $dialog.css({
            'margin-top': modalHeight,
            'left': 0
        });
//
//        $(this).draggable({
//            handle: ".modal-header" // 只能点击头部拖动
//        });
//        $(this).css("overflow", "hidden"); // 防止出现滚动条，出现的话，你会把滚动条一起拖着走的
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
//
//        $("#modalDialog").draggable(); //为模态对话框添加拖拽
//        $("#myModal").css("overflow", "hidden"); //禁止模态对话框的半透明背景滚动

        getLoginUserName();

    });
    /**
     * 新增模态框显示
     */
     $("#updatesecretModal").on('show.bs.modal', function () {
         /* autoRenderAuth($(this).find('div#perms'));*/
         $(this).find('input[name="oldPassword"]').val("");
         $(this).find('input[name="password"]').val("");
         $(this).find('input[name="confirmPassword"]').val("");
        // $(this).find('select ').val("");
     });
    
     var obj = $("#resetPasswordFormId").validationEngine({
    		
    		promptPosition: "centerRight",
    	    autoPositionUpdate: true,
    	    validationEventTrigger:'blur',
    		//binded:true,
    	    showOneMessage:true

    	});
</script>
<script>
    $(document).ready(function () {
        if(!sessionStorage.getItem('token')){
            window.location.href = './login.html'
        }else{
            getAdminMenu();
        }
    });

    function getAdminMenu() {
        $.ajax({
            type: "POST",
            url: "/user/admin/getAuthorityMenus",
            data: "",
            dataType: 'json',
            headers:{"Authorization": sessionStorage.token},
//            beforeSend: function (request) {
//                request.setRequestHeader("Authorization", localStorage.token);
//            },
            success: function (data) {
                if (data.code == 1) {
                    var json = data;
                    var this_data = eval(json.data);
//                    var icon = ["&#xe61f;","&#xe62d;", "&#xe603;", "&#xe639;", "&#xe614;", "&#xe60b;", "&#xe630;", "&#xe606;", "&#xe620;", "&#xe640;"];
                    if (this_data.length > 0) {

                        //$("#sidebar .nav").empty();

                        for (i = 0; i < this_data.length; i++) {
                            if(this_data[i].status == 1){
                                if (this_data[i].subAuthorities.length > 0) {
                                    var tmpStr = "" +
                                            "<li>" +
                                            "<a href='#' class='dropdown-toggle'>" +
                                            "<i class='icon icon" + i + "'>" + this_data[i].icon + "</i>" +
                                            "<span class='menu-text'>" + this_data[i].name + "</span>" +
                                            "<b class='arrow icon-angle-down toOpen'></b>" +
                                            "</a>" +
                                            "<ul class='submenu'>";
                                    for (j = 0; j < this_data[i].subAuthorities.length; j++) {
                                        if (this_data[i].subAuthorities[j].menuUrl != null) {
                                            this_data[i].subAuthorities[j].menuUrl = this_data[i].subAuthorities[j].menuUrl.replace(new RegExp("\\\\", "gm"), "\\\\");
                                        }
                                        tmpStr = tmpStr + '<li><a href="#" onclick="javascript:loadPage(&quot;' + this_data[i].subAuthorities[j].menuUrl + '&quot;);return false;">' + this_data[i].subAuthorities[j].name + '</a></li>';
                                    }
                                    tmpStr = tmpStr + "</ul></li>";
                                    $("#sidebar .nav").append(tmpStr);
                                } else {
                                    if (this_data[i].menuUrl == "") {
                                        $("#sidebar .nav").append('' +
                                                '<li>' +
                                                '<a href="#" class="dropdown-toggle">' +
                                                "<i class='icon " + i + "'>" + this_data[i].icon + "</i>" +
                                                '<span class="menu-text">' + this_data[i].name + '</span>' +
                                                '</a>' +
                                                '</li>');
                                    } else {
                                        //this_data[i].menuUrl=this_data[i].menuUrl.replaceAll('\\','\\\\');
                                        if (this_data[i].menuUrl != null) {
                                            this_data[i].menuUrl = this_data[i].menuUrl.replace(new RegExp("\\\\", "gm"), "\\\\");
                                        }
                                        $("#sidebar .nav").append('' +
                                                '<li>' +
                                                '<a href="#" onclick="javascript:loadPage(&quot;' + this_data[i].menuUrl + '&quot;);return false;" class="dropdown-toggle">' +
                                                "<i class='icon " + i + "'>" + this_data[i].icon + "</i>" +
                                                '<span class="menu-text">' + this_data[i].name + '</span>' +
                                                '</a>' +
                                                '</li>');
                                    }

                                }
                            }
                        }
                    } else {
                        alert("没有菜单数据！");
                    }
                } else {
                    window.location.href = "./login.html";

                }
            }
        });
    }
</script>
<script type="text/javascript">
    setTimeout(function() {
        sessionStorage.setItem('handlePerson', $(".user-info").html().split('>')[2]);
    }, 1000);
    function timeShow(){
        var date = new Date(),
                showTime = [date.getFullYear(),date.getMonth()+1,date.getDate(),date.getDay(),date.getHours()<10?'0'+date.getHours():date.getHours(),date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes(),date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds()],
                week = ['周日','周一','周二','周三','周四','周五','周六'],
                weeks = week[showTime[3]],
                time = showTime[0]+'年'+showTime[1]+'月'+showTime[2]+'日'+'('+weeks+')'+showTime[4]+':'+showTime[5]+':'+showTime[6];
        $('#showTimeBox').text(time);
        window.setTimeout("timeShow()",1000);
    };

    $('#creatGroup').on('click',function(){
        var switcher = true;
        sessionStorage.setItem('case',switcher);
        window.loadPage('groupManage/groupManage.html');
    });
    $('#newUser').on('click',function(){
        var switcher = true;
        sessionStorage.setItem('case',switcher);
        window.loadPage('usermanage/user.html');
    });
    $('#postMessage').on('click',function(){
        window.location.href=('fatie/fatie.html');
    });
    $('#reportMessage').on('click',function () {
        window.loadPage('reportPost/reportpost.html');
    });
    $('#newMessage').on('click',function () {
        window.loadPage('yuanfenManage/yuanfenList.html');
    });
    $('#newUsers').on('click',function () {
        window.loadPage('usermanage/user.html');
    });
    $('#newGroup').on('click',function () {
        window.loadPage('groupManage/groupManage.html');
    });

    $(function(){
       $.ajax({
          url:'/community/systemReport/getSystemReport',
          type:'POST',
          dataType:'json',
          data:{},
          success:function(resp){
              var data = resp.data;
              $('#postReportNumb').text(data.totalReportCount);
              $('#postNumb').text(data.newMsgsCount + '/' + data.totalMsgsCount);
              $('#userNumb').text(data.newUsersCount + '/' + data.totalUsersCount);
              $('#groupNumb').text(data.newGroupCount + '/' + data.totalGroupCount);
          },
          error:function(XMLHttpRequest,textStatus,er){
//              var data = resp.data;
              alert(textStatus);
          }
       });
    });
    $('.nav').on('click','li:first',function () {
        window.location.reload();
    });
</script>
<script src="script/utils.js" type="text/javascript"></script>
<div style="display:none"></div>
<script type="text/javascript">
    $('.icon-double-angle-right').hide
</script>
</body>

</html>
